import request from '@/utils/request'

// 查询样品入库子表列表
export function listWarehousing_child(query) {
  return request({
    url: '/custom/warehousing_child/list',
    method: 'get',
    params: query
  })
}

// 查询样品入库子表详细
export function getWarehousing_child(id) {
  return request({
    url: '/custom/warehousing_child/' + id,
    method: 'get'
  })
}

// 新增样品入库子表
export function addWarehousing_child(data) {
  return request({
    url: '/custom/warehousing_child',
    method: 'post',
    data: data
  })
}

// 修改样品入库子表
export function updateWarehousing_child(data) {
  return request({
    url: '/custom/warehousing_child',
    method: 'put',
    data: data
  })
}

// 删除样品入库子表
export function delWarehousing_child(id) {
  return request({
    url: '/custom/warehousing_child/' + id,
    method: 'delete'
  })
}

// 根据父入库ID查询明细列表
export function getDetailsByParentId(parentId) {
  return request({
    url: `/custom/warehousing_child/get_details_by_parent_id/${parentId}`,
    method: 'get'
  })
}